#include <iostream>

class Test
{
    private:
        Test(){}
    public:
        static Test* getInstance()
        {
            if(_test == nullptr)
            {
                _test = new Test();
            }
            return _test;
        }
        void print()
        {
            std::cout<<"HELLO"<<std::endl;
        }
    private:
        static Test* _test;
};
Test* Test:: _test = nullptr;

int main()
{
    Test::getInstance()->print();
    return 0;
}